<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta name="keywords" content="爽客网旅游，贵阳旅游，旅游" />
<meta name="description" content="爽客网旅游，贵阳旅游，旅游" />
<title>门票 - 爽客网 </title>
<link href="/css/phone/reset.css" type="text/css" rel="stylesheet" />
<link href="/css/phone/lr.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/base.js"></script>
<script type="text/javascript" src="/js/phone/jquery.ying.js"></script>
</head>

<body>
	<div class="w320 wrap">
    	<h1 class="com_tit">
        	${ticket.name}
        </h1>
        <form action="wapticketbuy.htm" method="post" id="order_form">
        	<input type="hidden" name="tid" value="${ticket.id}"/>
            <input type="hidden" name="orderTime" value="${udate}"/>
	       	<div class="mg_order">
	            <div class="box_s2">
	                <h1>产品信息</h1>
	                <div class="com_box_s1">
	                    <div class="top"></div>
	                    <div class="content">
	                        <ul class="com_ul ticket">
	                            <li>
	                               	<label>游玩日期</label><span class="tb">${udate}</span>
	                            </li>
	                            <li class="sep"></li>
	                            <li>
	                            	<div class="ticket_nums">
	                                	数量<input type="text" maxlength="4" name="count" id="count"/><i>张</i>
	                                </div>
	                                <label>成人票</label><span>￥${buytp.priceA}</span>
	                            </li>
	                            <c:if test="${buytp.priceC > 0}">
	                            	<li class="sep"></li>
	                            	<li>
		                            	<div class="ticket_nums">
		                                	数量<input type="text" maxlength="4" name="countC" id="count_c"/><i>张</i>
		                                </div>
		                                <label>儿童票</label><span>￥${buytp.priceC}</span>
		                            </li>
	                            </c:if>
	                        </ul>
	                    </div>
	                    <div class="bottom"></div>
	                </div>
	            </div>
	            
	            <div class="box_s2">
	                <h1>取票人信息</h1>
	                <div class="com_box_s1">
	                    <div class="top"></div>
	                    <div class="content">
	                        <ul class="com_ul o_hotel">
	                            <li>
	                               	<label>取票人</label><input type="text" name="contactor" id="contactor" class="tb" value="取票人姓名" />
	                            </li>
	                            <li class="sep"></li>
	                            <li>
	                               	<label>手机号码</label><input type="text" name="phone" id="phone" class="tb" value="手机号码" />
	                            </li>
	                            <li class="sep"></li>
	                            <li>
	                               	<label>订单备注</label><input type="text" name="memo" id="memo" class="tb" value="订单备注" />
	                            </li>
	                            <%--
	                            <li class="sep"></li>
	                            <li>
	                                <label>联系地址</label><input type="text" class="tb" value="联系地址"  />
	                            </li>
	                        --%></ul>
	                    </div>
	                    <div class="bottom"></div>
	                </div>
	            </div>
	            
	            
	            <a href="javascript:;" id="order_bt" class="def_link mb25 mt25">
	            	<i class="left"></i>
	                <span>下&nbsp;单</span>
	                <i class="right"></i>
	            </a>
	            
	        </div>
    	</form>
    </div>
    
    <script type="text/javascript">
    	$(function(){
    		$("#order_bt").click(function(){
    			var count = $("#count").val();
    			if(IsNull(count)){
    				alert("请输入成人票数");
    				COOL.hideLoad();
    				return ;
    			}
    			if(!GGTOOL.isNumber(count)){
    				alert("成人票数只能输入数字");
    				COOL.hideLoad();
    				return ;
    			}else if(parseInt(count) < 1){
    				alert("成人票数不能少于1张");
    				COOL.hideLoad();
    				return ;
    			}
    			if($("#count_c").size() > 0){
    				var countC = $("#count_c").val();
	    			
	    			if(!IsNull(countC) && !GGTOOL.isNumber(countC)){
	    				alert("儿童票数只能输入数字");
	    				COOL.hideLoad();
	    				return ;
	    			}
    			}
    			
    			var contactor = $("#contactor").val();
	    		if(IsNull(contactor) || contactor=='取票人姓名'){
	    			alert("请输入取票人姓名");
	    			COOL.hideLoad();
	    			return ;
	    		}
	    		var phone = $("#phone").val();
	    		if(GGTOOL.mobileCheck(document.getElementById("phone"))){
	    			$("#order_form").submit();
	    		}else{
	    			COOL.hideLoad();
	    		}
    		});
    		
    	});
    </script>
</body>
</html>
